FIND_PACKAGE(MyBoost)

INCLUDE_DIRECTORIES("${BOOST_INCLUDE_DIR}")
LINK_DIRECTORIES("${BOOST_LIBRARY_DIR}")
IF(MSVC)
	# Disable autolinking from asio->regex because we don't use it
	ADD_DEFINITIONS("-DBOOST_REGEX_NO_LIB")
ENDIF()

SET(SOURCES
	Main.cpp
	server.cpp        server.h
	client.cpp        client.h
	
	base_conn.cpp     base_conn.h
	server_conn.cpp   server_conn.h
	client_conn.cpp   client_conn.h

	network/asio_dgram_conn.h
	util/asio_timer_oneshot.h
	util/StrFormat.h
	
	util/ScopeExitSignal.h
	util/ScopeExitSignal.cpp
)

SET(LIBRARIES
#	lib-network
#	lib-util
)

ADD_EXECUTABLE(tcpoverudp ${SOURCES})

TARGET_LINK_LIBRARIES(tcpoverudp
	${LIBRARIES}
	${BOOST_SYSTEM_LIBRARY}
	${BOOST_THREAD_LIBRARY}
	${BOOST_SIGNALS_LIBRARY}
	${BOOST_DATETIME_LIBRARY}
	${BOOST_FILESYSTEM_LIBRARY}
	${BOOST_FILESYSTEM_LIBRARY}
	${BOOST_PROGRAM_OPTIONS_LIBRARY}
	${BOOST_SERIALIZATION_LIBRARY}
)
